<?php

/**
 * Base system module controller
 *
 * Helpful methods to make Controller.
 *
 * PHP versions 5
 * CAKEPHP versions 2.x
 * 
 * Green CMS - Content Management System and Framework Powerfull by Cakephp
 * Copyright 2012, GREEN GLOBAL CO., LTD (toancauxanh.vn)
 * 
 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @author        Technology Lab No.I <tech1@toancauxanh.vn>
 * @link          
 * @package       System.Controller
 * @since         Green v 1.0
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
App::uses('AppController', 'Controller');

/**
 * Autocomple in PHP's IDE solution
 * 
 * @property DashboardComponent $Dashboard
 * 
 */
Class SystemController extends AppController {

    /**
     * Theme
     *
     * @var string
     */
    public $theme = 'Green';

    /**
     * Components
     *
     * @var array
     */
    public $components = array(
        'System.Dashboard'
    );

    /**
     * Disable token in index action
     *
     * @return void
     */
    public function beforeFilter() {
        parent::beforeFilter();
        if ($this->request['action'] === 'admin_index') {
            $this->Components->disable('Security');
        }
        if (isset($this->Security)) {
            $this->Security->unlockedFields = array('task');
        }
    }

    /**
     * Use for create a map permission on maintenance mode
     *
     * @return void
     */
    public function maintenance() {
        
    }

    /**
     * Admin dashboard
     *
     * @return void
     */
    public function admin_dashboard() {
        
    }

}

?>
